import request from '@/utils/request'

// 查询供应商/客户/会员信息列表
export function listSupplier(query) {
  return request({
    url: '/basicsystem/supplier/list',
    method: 'get',
    params: query
  })
}

// 查询供应商/客户/会员信息详细
export function getSupplier(id) {
  return request({
    url: '/basicsystem/supplier/' + id,
    method: 'get'
  })
}

// 新增供应商/客户/会员信息
export function addSupplier(data) {
  return request({
    url: '/basicsystem/supplier',
    method: 'post',
    data: data
  })
}

// 修改供应商/客户/会员信息
export function updateSupplier(data) {
  return request({
    url: '/basicsystem/supplier',
    method: 'put',
    data: data
  })
}

// 删除供应商/客户/会员信息
export function delSupplier(id) {
  return request({
    url: '/basicsystem/supplier/' + id,
    method: 'delete'
  })
}

// 修改供应商/客户/会员信息状态
export function updateSupplierStatus(ids,status) {
  return request({
    url: '/basicsystem/supplier/' + status + '/' + ids,
    method: 'delete'
  })
}

// 查询供应商下拉框列表
export function getSuppliers(query) {
  return request({
    url: '/basicsystem/supplier/selectlist',
    method: 'get',
    params: query
  })
}
// 查询供应商全部数据
export function listAllSupplier(query) {
  return request({
    url: '/basicsystem/supplier/listAll',
    method: 'get',
    params: query
  })
}
